/*#include "TrainAction.h"

#define Magic(rtype) template <class T>\
	rtype TrainAction<T, typename std::enable_if< std::is_base_of< TrainingCompare, T >::value>::type>
#define Black TrainAction<T, typename std::enable_if< std::is_base_of< TrainingCompare, T >::value>::type>

template<class T>
TrainAction<T,typename std::enable_if< std::is_base_of< TrainingCompare, T >::value>::type>::TrainAction()
{
	group = NULL;
}

template <class T>
Black::TrainAction(UnitType uType, int priority = 0)
{
	group = NULL;
	addUnitRequest(uType, priority);
}

Magic(Black*)::clone()
{
	return new TrainAction(*this);
}

Magic(void)::addUnitRequest(UnitType uType, int priority = 0)
{
	trainQueue.push(PUnitType(UnitType));
}

Magic(void)::_onFrame()
{
	if(group == NULL)
		return;
	if(trainQueue.empty())
		stop();
	for ( Unitset::iterator i = group->getUnits()->begin(); i != group->getUnits()->end(); ++i ) {
		// Get a direct pointer to our unit so we do not have to continuously dereference the iterator
		Unit *u = *i;
		if ( *u == NULL || !u->exists() )
			continue;

		// Ignore the unit if it has one of the following status ailments
		if ( u->isLockedDown() || u->isMaelstrommed() || u->isStasised() )
			continue;


		// Ignore the unit if it is in one of the following states
		if ( u->isLoaded() || u->isUnpowered() || u->isStuck() )
			continue;

		// Ignore the unit if it is incomplete or busy constructing
		if ( !u->isCompleted() || u->isConstructing() )
			continue;

		UnitType uType = u->getType();
		if(uType.isBuilding() && uType.canProduce() && u->isIdle()) {
			u->train(trainQueue.top());
			trainQueue.pop();
        }
	}
}

Magic(void)::_onActionStart()
{
}

Magic(void)::_onActionStop()
{
}*/